From b8b2e1c8bc3b5a994d1fa0ad1b772f321f6827d8 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Thu, 12 Nov 2009 13:12:18 +0000 Subject: [PATCH] Some measures to prevent people from update.php/upgrade1_5.php confusion: the latter now displays a warning and requires --update switch to do something. Probably, it's time to put it to death completely? --- RELEASE-NOTES | 1 + maintenance/upgrade1_5.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 989c80bd7c..68c5adf152 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -277,6 +277,7 @@ Hopefully we will remove this configuration var soon) * Added search capabilities to SQLite backend * rebuildtextindex.php maintenance script now supports databases other than MySQL +* upgrade1_5.php now requires to be run --update option to prevent confusion === Bug fixes in 1.16 === diff --git a/maintenance/upgrade1_5.php b/maintenance/upgrade1_5.php index 23eb30fdc7..4834a4a116 100644 --- a/maintenance/upgrade1_5.php +++ b/maintenance/upgrade1_5.php @@ -18,6 +18,15 @@ $options = array( 'step', 'noimages' ); require_once( dirname(__FILE__) . '/commandLine.inc' ); require_once( 'FiveUpgrade.inc' ); +echo "ATTENTION: This script is for upgrades from 1.4 to 1.5 (NOT 1.15) in very special cases.\n"; +echo "Use update.php for usual updates.\n"; + +// Seems to confuse some people +if ( !array_search( '--upgrade', $_SERVER['argv'] ) ) { + echo "Please run this script with --upgrade key to actually run the updater.\n"; + die; +} + $upgrade = new FiveUpgrade(); $step = isset( $options['step'] ) ? $options['step'] : null; $upgrade->upgrade( $step ); -- 2.20.1